import {Pipe, PipeTransform} from '@angular/core';

@Pipe({name: 'moneyPipe'})
export class MoneyPipe implements PipeTransform {
  transform(value: number): string {
    let money = '3万以下';
    switch (value) {
      case 1:
        money = '3万以下';
        break;
      case 2:
        money = '3-5万';
        break;
      case 3:
        money = '5-10万';
        break;
      case 4:
        money = '10-15万';
        break;
      case 5:
        money = '15-20万';
        break;
      case 6:
        money = '20-50万';
        break;
      case 7:
        money = '50-100万';
        break;
      case 8:
        money = '100万以上';
        break;
    }
    return money;
  }

}
